home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
cc03.arc
/
HISTGRAM.C
< prev
next >
Wrap
Text File
|
1986-03-14
|
974b
|
67 lines
#include <stdio.h>
#define MAXNUMSTARS 50
#define MAXNUMENTRIES 50
#define NUMTOCLEAR 25
#define VOID int
extern double FindScalingFraction() ;
main() {
int EntryCount ; /* looping variable -- the current entry number */
FILE *OutFile ; /* where we're writing information */
int NumEntries ; /* total number of entries */
double ScalingMultiplier ; /* the scaling value */
double Value[MAXNUMENTRIES] ; /* all values the user enters */
if ((OutFile = fopen("histgrm6","w")) == 0) {
fprintf(stderr, "Can't open output file.\n") ;
exit(0) ;
}
ClearScreen() ;
printf("How many entries will you make? ") ;
scanf("%d", &NumEntries) ;
while (NumEntries > MAXNUMENTRIES || NumEntries < 1) {
printf("\n\tIcan only accept a number between 1 and %d!\n",
MAXNUMENTRIES) ;
printf("\nHow many entries will you make") ;
scanf("%d", &NumEntries) ;
}